package com.totem.order.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
public class ConversionOrderVO implements Comparable<ConversionOrderVO>, Serializable {
    @NotEmpty
    @Schema(description = "源币种")
    private String srcCurrency;
    @Schema(description = "目标币种")
    @NotEmpty
    private String dstCurrency;
    @Schema(description = "转化数量")
    @NotNull
    private BigDecimal conversionNum;
    @NotNull
    @Schema(description = "实际到账")
    private BigDecimal amount;
    @NotNull
    @Schema(description = "转化手续费")
    private BigDecimal charge;
    @NotNull
    @Schema(description = "交易密码")
    private String txPassword;

    @Schema(description = "下单时间")
    private Date orderDate;

    @Schema(description = "转化方向")
    private String directionRemark;

    @Override
    public int compareTo(@org.jetbrains.annotations.NotNull ConversionOrderVO o) {
        return o.getOrderDate().compareTo(this.getOrderDate());
    }
}
